<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<div class="container">
	<form class="form-horizontal" role="form" id="systemConfigForm">
		<div class="row text-center outer">
			<h3>系统参数</h3>
		</div>
		<!-- 操作 -->
		<br />
		<div class="row">
			<!-- 系统参数配置 -->
			<div class="col-md-2"></div>
			<div class="col-md-8">
				<div class="panel panel-info">
					<div class="panel-heading text-right">
						<button id="driverSubBtn" type="button" class="btn btn-primary">
							<span class="fa fa-save"></span> 保存
						</button>
						<button id="driverBackIndexBtn" type="button"
							class="btn btn-default">
							<span class="fa fa-reply"></span> 返回
						</button>
					</div>
					<div class="panel-body">
						<div class="form-group">
							<label class="col-sm-3 control-label">单次最多执行数</label>
							<div class="col-sm-7">
								<input type="text" class="form-control required" name="taskMaxNumber"
									placeholder="5000000">
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label">批量执行数</label>
							<div class="col-sm-7">
								<input type="text" class="form-control required" name="batchNumber"
									placeholder="20000">
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label">线程数</label>
							<div class="col-sm-7">
								<input type="text" class="form-control required" name="threadNumber"
									placeholder="200">
							</div>
						</div>
					</div>
				</div>
			</div>
			<div class="col-md-2"></div>
		</div>
	</form>
</div>
<script type="text/javascript">
$(function() {	
	//保存
	$("#driverSubBtn").click(function(){
		var $form=$("#systemConfigForm");
		var taskMaxNumber=$form.find('input[name="taskMaxNumber"]').val();
		var batchNumber=$form.find('input[name="batchNumber"]').val();
		var threadNumber=$form.find('input[name="threadNumber"]').val();
		//对登录表单进行非空校验
		$form.find("input.required").each(function(){
			if($(this).val()!=""){
				$(this).removeClass("error");
				return;	
			}
			$(this).addClass("error");
		});	
		//触发 keyup 事件
		$form.find("input.required").keyup(function(){
			$(this).removeClass("error");
			if($(this).val()==""){
				$(this).addClass("error");
			}
		});	
		
		bootGrowl("保存成功！","success");
		/* if(count1 != ""&& count2 != ""&&count3!=""){
			// 点击确定确认登录请求后台
			$.post($basePath + "", {"taskMaxNumber":taskMaxNumber,"batchNumber":batchNumber,"threadNumber":threadNumber}, function(data) {
				if(data.success==true){
					bootGrowl(data.resultValue,"success"); 
				}else{
					// 请求失败
					alert(data.resultValue); 
				}
			});
		} */
	});

	
	//返回
	$("#driverBackIndexBtn").click(function(){
		//加载页面
		$initContainer.load($basePath+"/index");
	});
	
});
</script>